Integrand size = 21, antiderivative size = 169 \[ \int \frac {\tan ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {\left (a^4-6 a^2 b^2+b^4\right ) x}{\left (a^2+b^2\right )^4}-\frac {4 a b \left (a^2-b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right )^4 d}-\frac {a^2}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}+\frac {a b}{\left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac {b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^3 d (a+b \tan (c+d x))} \]
[Out]
Time = 0.34 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3623, 3610, 3612, 3611} \[ \int \frac {\tan ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {a^2}{3 b d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}+\frac {a b}{d \left (a^2+b^2\right )^2 (a+b \tan (c+d x))^2}+\frac {b \left (3 a^2-b^2\right )}{d \left (a^2+b^2\right )^3 (a+b \tan (c+d x))}-\frac {4 a b \left (a^2-b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )^4}-\frac {x \left (a^4-6 a^2 b^2+b^4\right )}{\left (a^2+b^2\right )^4} \]
[In]
[Out]
Rule 3610
Rule 3611
Rule 3612
Rule 3623
Rubi steps \begin{align*} \text {integral}& = -\frac {a^2}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}+\frac {\int \frac {-a+b \tan (c+d x)}{(a+b \tan (c+d x))^3} \, dx}{a^2+b^2} \\ & = -\frac {a^2}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}+\frac {a b}{\left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac {\int \frac {-a^2+b^2+2 a b \tan (c+d x)}{(a+b \tan (c+d x))^2} \, dx}{\left (a^2+b^2\right )^2} \\ & = -\frac {a^2}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}+\frac {a b}{\left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac {b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^3 d (a+b \tan (c+d x))}+\frac {\int \frac {-a \left (a^2-3 b^2\right )+b \left (3 a^2-b^2\right ) \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{\left (a^2+b^2\right )^3} \\ & = -\frac {\left (a^4-6 a^2 b^2+b^4\right ) x}{\left (a^2+b^2\right )^4}-\frac {a^2}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}+\frac {a b}{\left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac {b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^3 d (a+b \tan (c+d x))}-\frac {\left (4 a b \left (a^2-b^2\right )\right ) \int \frac {b-a \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{\left (a^2+b^2\right )^4} \\ & = -\frac {\left (a^4-6 a^2 b^2+b^4\right ) x}{\left (a^2+b^2\right )^4}-\frac {4 a b \left (a^2-b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right )^4 d}-\frac {a^2}{3 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}+\frac {a b}{\left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac {b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^3 d (a+b \tan (c+d x))} \\ \end{align*}
Result contains complex when optimal does not.
Time = 6.23 (sec) , antiderivative size = 324, normalized size of antiderivative = 1.92 \[ \int \frac {\tan ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\frac {b^2 \tan ^3(c+d x)}{3 a \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}+\frac {\frac {3 a \tan (c+d x)}{d (a+b \tan (c+d x))^2}-\frac {3 a \left (\frac {i \log (i-\tan (c+d x))}{(a+i b)^2}-\frac {i \log (i+\tan (c+d x))}{(a-i b)^2}-\frac {4 a b \log (a+b \tan (c+d x))}{\left (a^2+b^2\right )^2}+\frac {2 b}{\left (a^2+b^2\right ) (a+b \tan (c+d x))}-2 a \left (\frac {\log (i-\tan (c+d x))}{(i a-b)^3}-\frac {\log (i+\tan (c+d x))}{(i a+b)^3}-\frac {2 b \left (3 a^2-b^2\right ) \log (a+b \tan (c+d x))}{\left (a^2+b^2\right )^3}+\frac {b}{\left (a^2+b^2\right ) (a+b \tan (c+d x))^2}+\frac {4 a b}{\left (a^2+b^2\right )^2 (a+b \tan (c+d x))}\right )\right )}{2 d}}{3 a \left (a^2+b^2\right )} \]
[In]
[Out]
Time = 0.43 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.12
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (4 a^{3} b -4 a \,b^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (-a^{4}+6 a^{2} b^{2}-b^{4}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}-\frac {a^{2}}{3 \left (a^{2}+b^{2}\right ) b \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {a b}{\left (a^{2}+b^{2}\right )^{2} \left (a +b \tan \left (d x +c \right )\right )^{2}}+\frac {b \left (3 a^{2}-b^{2}\right )}{\left (a^{2}+b^{2}\right )^{3} \left (a +b \tan \left (d x +c \right )\right )}-\frac {4 a b \left (a^{2}-b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}}{d}\) | \(190\) |
default | \(\frac {\frac {\frac {\left (4 a^{3} b -4 a \,b^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (-a^{4}+6 a^{2} b^{2}-b^{4}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}-\frac {a^{2}}{3 \left (a^{2}+b^{2}\right ) b \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {a b}{\left (a^{2}+b^{2}\right )^{2} \left (a +b \tan \left (d x +c \right )\right )^{2}}+\frac {b \left (3 a^{2}-b^{2}\right )}{\left (a^{2}+b^{2}\right )^{3} \left (a +b \tan \left (d x +c \right )\right )}-\frac {4 a b \left (a^{2}-b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}}{d}\) | \(190\) |
norman | \(\frac {\frac {\left (3 a^{2} b^{4}-b^{6}\right ) \left (\tan ^{2}\left (d x +c \right )\right )}{b \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) d}+\frac {a \left (7 a^{2} b^{4}-b^{6}\right ) \tan \left (d x +c \right )}{b^{2} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) d}+\frac {a^{2} \left (-a^{4} b^{2}+10 a^{2} b^{4}-b^{6}\right )}{3 b^{3} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) d}-\frac {\left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) a^{3} x}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}-\frac {b^{3} \left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) x \left (\tan ^{3}\left (d x +c \right )\right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}-\frac {3 b \left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) a^{2} x \tan \left (d x +c \right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}-\frac {3 b^{2} \left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) a x \left (\tan ^{2}\left (d x +c \right )\right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}}{\left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {2 a b \left (a^{2}-b^{2}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 b^{6} a^{2}+b^{8}\right )}-\frac {4 a b \left (a^{2}-b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{d \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 b^{6} a^{2}+b^{8}\right )}\) | \(545\) |
risch | \(\frac {x}{4 i a^{3} b -4 i a \,b^{3}-a^{4}+6 a^{2} b^{2}-b^{4}}+\frac {8 i a^{3} b x}{a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 b^{6} a^{2}+b^{8}}-\frac {8 i a \,b^{3} x}{a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 b^{6} a^{2}+b^{8}}+\frac {8 i a^{3} b c}{d \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 b^{6} a^{2}+b^{8}\right )}-\frac {8 i a \,b^{3} c}{d \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 b^{6} a^{2}+b^{8}\right )}+\frac {2 i \left (-6 i a \,b^{5} {\mathrm e}^{2 i \left (d x +c \right )}+3 a^{6} {\mathrm e}^{4 i \left (d x +c \right )}-9 a^{4} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+9 a^{2} b^{4} {\mathrm e}^{4 i \left (d x +c \right )}-3 b^{6} {\mathrm e}^{4 i \left (d x +c \right )}+24 i a^{3} b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+6 i a \,b^{5}+6 a^{6} {\mathrm e}^{2 i \left (d x +c \right )}-24 a^{4} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-24 a^{2} b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+6 b^{6} {\mathrm e}^{2 i \left (d x +c \right )}+6 i a^{5} b \,{\mathrm e}^{2 i \left (d x +c \right )}+6 i a^{5} b -32 i a^{3} b^{3}+3 a^{6}-19 a^{4} b^{2}+19 a^{2} b^{4}-3 b^{6}\right )}{3 \left (i b +a \right )^{3} \left (-i b \,{\mathrm e}^{2 i \left (d x +c \right )}+a \,{\mathrm e}^{2 i \left (d x +c \right )}+i b +a \right )^{3} \left (-i b +a \right )^{4} d}-\frac {4 a^{3} b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{\left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 b^{6} a^{2}+b^{8}\right ) d}+\frac {4 a \,b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{d \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 b^{6} a^{2}+b^{8}\right )}\) | \(629\) |
parallelrisch | \(\frac {54 x \tan \left (d x +c \right ) a^{4} b^{6} d -9 x \tan \left (d x +c \right ) a^{2} b^{8} d +21 \tan \left (d x +c \right ) a^{5} b^{5}+18 \tan \left (d x +c \right ) a^{3} b^{7}-12 \ln \left (a +b \tan \left (d x +c \right )\right ) a^{6} b^{4}+18 x \,a^{5} b^{5} d -3 x \,a^{3} b^{7} d -18 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \left (\tan ^{2}\left (d x +c \right )\right ) a^{2} b^{8}-36 \ln \left (a +b \tan \left (d x +c \right )\right ) \left (\tan ^{2}\left (d x +c \right )\right ) a^{4} b^{6}+36 \ln \left (a +b \tan \left (d x +c \right )\right ) \left (\tan ^{2}\left (d x +c \right )\right ) a^{2} b^{8}+18 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \tan \left (d x +c \right ) a^{5} b^{5}-18 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \tan \left (d x +c \right ) a^{3} b^{7}-3 x \left (\tan ^{3}\left (d x +c \right )\right ) b^{10} d -12 \ln \left (a +b \tan \left (d x +c \right )\right ) \left (\tan ^{3}\left (d x +c \right )\right ) a^{3} b^{7}+12 \ln \left (a +b \tan \left (d x +c \right )\right ) \left (\tan ^{3}\left (d x +c \right )\right ) a \,b^{9}+12 \ln \left (a +b \tan \left (d x +c \right )\right ) a^{4} b^{6}+36 \ln \left (a +b \tan \left (d x +c \right )\right ) \tan \left (d x +c \right ) a^{3} b^{7}-3 \tan \left (d x +c \right ) a \,b^{9}-a^{2} b^{8}+6 \left (\tan ^{2}\left (d x +c \right )\right ) a^{2} b^{8}-3 x \left (\tan ^{3}\left (d x +c \right )\right ) a^{4} b^{6} d -9 x \left (\tan ^{2}\left (d x +c \right )\right ) a^{5} b^{5} d -9 x \left (\tan ^{2}\left (d x +c \right )\right ) a \,b^{9} d -a^{8} b^{2}-6 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) a^{4} b^{6}+9 \left (\tan ^{2}\left (d x +c \right )\right ) a^{4} b^{6}+6 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) a^{6} b^{4}+9 a^{6} b^{4}+9 a^{4} b^{6}-36 \ln \left (a +b \tan \left (d x +c \right )\right ) \tan \left (d x +c \right ) a^{5} b^{5}-3 x \,a^{7} b^{3} d +6 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \left (\tan ^{3}\left (d x +c \right )\right ) a^{3} b^{7}-6 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \left (\tan ^{3}\left (d x +c \right )\right ) a \,b^{9}+18 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \left (\tan ^{2}\left (d x +c \right )\right ) a^{4} b^{6}-3 \left (\tan ^{2}\left (d x +c \right )\right ) b^{10}-9 x \tan \left (d x +c \right ) a^{6} b^{4} d +18 x \left (\tan ^{3}\left (d x +c \right )\right ) a^{2} b^{8} d +54 x \left (\tan ^{2}\left (d x +c \right )\right ) a^{3} b^{7} d}{3 \left (a +b \tan \left (d x +c \right )\right )^{3} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) d \,b^{3} \left (a^{2}+b^{2}\right )}\) | \(742\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 531 vs. \(2 (167) = 334\).
Time = 0.27 (sec) , antiderivative size = 531, normalized size of antiderivative = 3.14 \[ \int \frac {\tan ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {6 \, a^{6} b - 15 \, a^{4} b^{3} + a^{2} b^{5} - {\left (a^{5} b^{2} - 15 \, a^{3} b^{4} + 6 \, a b^{6} - 3 \, {\left (a^{4} b^{3} - 6 \, a^{2} b^{5} + b^{7}\right )} d x\right )} \tan \left (d x + c\right )^{3} + 3 \, {\left (a^{7} - 6 \, a^{5} b^{2} + a^{3} b^{4}\right )} d x - 3 \, {\left (a^{6} b - 12 \, a^{4} b^{3} + 8 \, a^{2} b^{5} - b^{7} - 3 \, {\left (a^{5} b^{2} - 6 \, a^{3} b^{4} + a b^{6}\right )} d x\right )} \tan \left (d x + c\right )^{2} + 6 \, {\left (a^{6} b - a^{4} b^{3} + {\left (a^{3} b^{4} - a b^{6}\right )} \tan \left (d x + c\right )^{3} + 3 \, {\left (a^{4} b^{3} - a^{2} b^{5}\right )} \tan \left (d x + c\right )^{2} + 3 \, {\left (a^{5} b^{2} - a^{3} b^{4}\right )} \tan \left (d x + c\right )\right )} \log \left (\frac {b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) - 3 \, {\left (a^{7} - 8 \, a^{5} b^{2} + 12 \, a^{3} b^{4} - a b^{6} - 3 \, {\left (a^{6} b - 6 \, a^{4} b^{3} + a^{2} b^{5}\right )} d x\right )} \tan \left (d x + c\right )}{3 \, {\left ({\left (a^{8} b^{3} + 4 \, a^{6} b^{5} + 6 \, a^{4} b^{7} + 4 \, a^{2} b^{9} + b^{11}\right )} d \tan \left (d x + c\right )^{3} + 3 \, {\left (a^{9} b^{2} + 4 \, a^{7} b^{4} + 6 \, a^{5} b^{6} + 4 \, a^{3} b^{8} + a b^{10}\right )} d \tan \left (d x + c\right )^{2} + 3 \, {\left (a^{10} b + 4 \, a^{8} b^{3} + 6 \, a^{6} b^{5} + 4 \, a^{4} b^{7} + a^{2} b^{9}\right )} d \tan \left (d x + c\right ) + {\left (a^{11} + 4 \, a^{9} b^{2} + 6 \, a^{7} b^{4} + 4 \, a^{5} b^{6} + a^{3} b^{8}\right )} d\right )}} \]
[In]
[Out]
Exception generated. \[ \int \frac {\tan ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\text {Exception raised: AttributeError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 389 vs. \(2 (167) = 334\).
Time = 0.35 (sec) , antiderivative size = 389, normalized size of antiderivative = 2.30 \[ \int \frac {\tan ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {\frac {3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} {\left (d x + c\right )}}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} + \frac {12 \, {\left (a^{3} b - a b^{3}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} - \frac {6 \, {\left (a^{3} b - a b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} + \frac {a^{6} - 10 \, a^{4} b^{2} + a^{2} b^{4} - 3 \, {\left (3 \, a^{2} b^{4} - b^{6}\right )} \tan \left (d x + c\right )^{2} - 3 \, {\left (7 \, a^{3} b^{3} - a b^{5}\right )} \tan \left (d x + c\right )}{a^{9} b + 3 \, a^{7} b^{3} + 3 \, a^{5} b^{5} + a^{3} b^{7} + {\left (a^{6} b^{4} + 3 \, a^{4} b^{6} + 3 \, a^{2} b^{8} + b^{10}\right )} \tan \left (d x + c\right )^{3} + 3 \, {\left (a^{7} b^{3} + 3 \, a^{5} b^{5} + 3 \, a^{3} b^{7} + a b^{9}\right )} \tan \left (d x + c\right )^{2} + 3 \, {\left (a^{8} b^{2} + 3 \, a^{6} b^{4} + 3 \, a^{4} b^{6} + a^{2} b^{8}\right )} \tan \left (d x + c\right )}}{3 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 376 vs. \(2 (167) = 334\).
Time = 0.76 (sec) , antiderivative size = 376, normalized size of antiderivative = 2.22 \[ \int \frac {\tan ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {\frac {3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} {\left (d x + c\right )}}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} - \frac {6 \, {\left (a^{3} b - a b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} + \frac {12 \, {\left (a^{3} b^{2} - a b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{8} b + 4 \, a^{6} b^{3} + 6 \, a^{4} b^{5} + 4 \, a^{2} b^{7} + b^{9}} - \frac {22 \, a^{3} b^{5} \tan \left (d x + c\right )^{3} - 22 \, a b^{7} \tan \left (d x + c\right )^{3} + 75 \, a^{4} b^{4} \tan \left (d x + c\right )^{2} - 60 \, a^{2} b^{6} \tan \left (d x + c\right )^{2} - 3 \, b^{8} \tan \left (d x + c\right )^{2} + 87 \, a^{5} b^{3} \tan \left (d x + c\right ) - 48 \, a^{3} b^{5} \tan \left (d x + c\right ) - 3 \, a b^{7} \tan \left (d x + c\right ) - a^{8} + 31 \, a^{6} b^{2} - 13 \, a^{4} b^{4} - a^{2} b^{6}}{{\left (a^{8} b + 4 \, a^{6} b^{3} + 6 \, a^{4} b^{5} + 4 \, a^{2} b^{7} + b^{9}\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{3}}}{3 \, d} \]
[In]
[Out]
Time = 5.34 (sec) , antiderivative size = 326, normalized size of antiderivative = 1.93 \[ \int \frac {\tan ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {\frac {a^6-10\,a^4\,b^2+a^2\,b^4}{3\,b\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (b^5-3\,a^2\,b^3\right )}{a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6}+\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (a\,b^4-7\,a^3\,b^2\right )}{a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6}}{d\,\left (a^3+3\,a^2\,b\,\mathrm {tan}\left (c+d\,x\right )+3\,a\,b^2\,{\mathrm {tan}\left (c+d\,x\right )}^2+b^3\,{\mathrm {tan}\left (c+d\,x\right )}^3\right )}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )}{2\,d\,\left (a^4\,1{}\mathrm {i}-4\,a^3\,b-a^2\,b^2\,6{}\mathrm {i}+4\,a\,b^3+b^4\,1{}\mathrm {i}\right )}-\frac {4\,a\,b\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )\,\left (a^2-b^2\right )}{d\,{\left (a^2+b^2\right )}^4}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,d\,\left (a^4-a^3\,b\,4{}\mathrm {i}-6\,a^2\,b^2+a\,b^3\,4{}\mathrm {i}+b^4\right )} \]
[In]
[Out]